/**
 * Project Name:springBoot_job
 * File Name:Test.java
 * Package Name:com.libra.controller
 * Date:2018年6月7日下午4:47:42
 * Copyright (c) 2018, wangzhicheng All Rights Reserved.
 *
*/

package com.libra.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * ClassName:Test <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason:	 TODO ADD REASON. <br/>
 * Date:     2018年6月7日 下午4:47:42 <br/>
 * @author   wangzhicheng
 * @version  
 * @since    JDK 1.7
 * @see 	 
 */
@Controller
@RequestMapping("/city")
public class CityController {

	@Value("${book.name}")
	private String name;
	@RequestMapping("/hello")
	public ModelAndView hello() {
		System.out.println(name);
//		return "hello world:"+name;
		ModelAndView mav=new ModelAndView();
		mav.setViewName("403");
		return mav;
	}
	@RequestMapping("/hello2")
	public String hello2() {
		System.out.println(name);
//		return "hello world:"+name;
//		ModelAndView mav=new ModelAndView();
//		mav.setViewName("test");
		return "add";
	}
}

